package com.drg.center.service.impl;

import com.drg.center.dao.EsDataMiningExtDAO;
import com.drg.center.dao.EsDoctorGroupAngleDAO;
import com.drg.center.dao.EsDrgAngleDAO;
import com.drg.center.entity.param.DoctorGroupSummaryDTO;
import com.drg.center.entity.param.DoctorSummaryDTO;
import com.drg.center.entity.result.*;
import com.drg.center.service.StatisticsDoctorFromEsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * @Author: zhangxilin
 * @Date: 2025/1/6
 */
@Service
public class StatisticsDoctorFromEsServiceImpl implements StatisticsDoctorFromEsService {

    @Autowired
    private EsDoctorGroupAngleDAO esDoctorGroupAngleDAO;
    @Autowired
    private EsDrgAngleDAO esDrgAngleDAO;
    @Autowired
    private EsDataMiningExtDAO esDataMiningExtDAO;

    @Override
    public List<DoctorGoupSummaryVO> getDoctorGoupSummaryVO(DoctorGroupSummaryDTO param) {
        return esDoctorGroupAngleDAO.getDoctorGoupSummaryVO(param);
    }

    @Override
    public List<KeyValueVO> getDoctorGroupProfitStt(LocalDate startDate, LocalDate endDate) {
        return esDoctorGroupAngleDAO.getDoctorGroupProfitStt(startDate, endDate);
    }

    @Override
    public ProfitLossMixVO getDoctorGroupProfitRateStt(LocalDate startDate, LocalDate endDate) {
        return esDoctorGroupAngleDAO.getDoctorGroupProfitRateStt(startDate, endDate);
    }

    @Override
    public ChartLineVO getDoctorGroupProfitTrendVO(Integer year) {
        return esDoctorGroupAngleDAO.getDoctorGroupProfitTrendVO(year);
    }

    @Override
    public List<DoctorSummaryVO> getDoctorSummaryVO(DoctorSummaryDTO param) {
        return esDoctorGroupAngleDAO.getDoctorSummaryVO(param);
    }

    @Override
    public ProfitLossMixVO getDoctorProfitRateStt(LocalDate startDate, LocalDate endDate) {
        return esDoctorGroupAngleDAO.getDoctorProfitRateStt(startDate, endDate);
    }

    @Override
    public List<KeyValueVO> getDoctorProfitTop5(LocalDate startDate, LocalDate endDate) {
        return esDoctorGroupAngleDAO.getDoctorProfitTop5(startDate, endDate);
    }

    @Override
    public List<KeyValueVO> getDoctorLossTop5(LocalDate startDate, LocalDate endDate) {
        return esDoctorGroupAngleDAO.getDoctorLossTop5(startDate, endDate);
    }

    @Override
    public ChartLineVO getDoctorCostTrend(Integer year, List<String> doctorCodeList) {
        return esDoctorGroupAngleDAO.getDoctorCostTrend(year, doctorCodeList);
    }

    @Override
    public DifficultCaseDistributeVO getDifficultCaseDistribute(List<String> searchDrgCodeList, LocalDate startDate, LocalDate endDate) {
        return esDrgAngleDAO.getDifficultCaseDistribute(searchDrgCodeList, startDate, endDate);
    }

    @Override
    public ChartLineVO getDrgProfitTrend(Integer year, List<String> drgCodeList) {
        return esDrgAngleDAO.getDrgProfitTrend(year, drgCodeList);
    }

    @Override
    public ChartLineVO getDrgAvgCostTrend(Integer year, List<String> drgCodeList) {
        return esDrgAngleDAO.getDrgAvgCostTrend(year, drgCodeList);
    }

    @Override
    public List<DrgProfitLossProjectTotalPageVO> getDrgProjectStt(String searchDepartCode, String searchDrgCode, LocalDate startDate, LocalDate endDate) {
        return esDrgAngleDAO.getDrgProjectStt(searchDepartCode, searchDrgCode, startDate, endDate);
    }

    @Override
    public List<CaseComplexityAnalysisPageVO> getComplexity(String searchDepartCode, LocalDate startDate, LocalDate endDate) {
        return esDrgAngleDAO.getComplexity(searchDepartCode, startDate, endDate);
    }

    @Override
    public ChartLineVO getCostBoxData(Integer year) {
        return esDrgAngleDAO.getCostBoxData(year);
    }

    @Override
    public List<MedicareBenchmarkingAnalysisPageVO> benchmarkStt(String searchDrgCode, LocalDate startDate, LocalDate endDate) {
        return esDataMiningExtDAO.benchmarkStt(searchDrgCode, startDate, endDate);
    }

    @Override
    public PatientStructuralAnalysisEsVO structuralStt(LocalDate startDate, LocalDate endDate, Integer startAge, Integer endAge, String insuranceType) {
        return esDataMiningExtDAO.structuralStt(startDate, endDate, startAge, endAge, insuranceType);
    }

    @Override
    public ChartLineVO getExpireFundCostTrend(Integer year, List<String> departCodeList) {
        return esDataMiningExtDAO.getExpireFundCostTrend(year, departCodeList);
    }

    @Override
    public List<ComprehensiveAnalysisPageVO> comprehensiveStt(String searchDepartCode, LocalDate startDate, LocalDate endDate) {
        return esDataMiningExtDAO.comprehensiveStt(searchDepartCode, startDate, endDate);
    }

    @Override
    public List<OverRankingAnalysisPageVO> overRankStt(LocalDate startDate, LocalDate endDate) {
        return esDataMiningExtDAO.overRankStt(startDate, endDate);
    }

    @Override
    public List<DrgSettleVO> getDrgSettleStt(LocalDate startDate, LocalDate endDate) {
        return esDrgAngleDAO.getDrgSettleStt(startDate, endDate);
    }
}
